import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
// import piniaPlugin from 'pinia';

let app;

export function mount(el) {
    const targetElement = el || '#app';
    app = createApp(App);
    app.use(router);
    // app.use(piniaPlugin());
    app.mount(targetElement);
}

export function unmount() {
    if (app) {
        app.unmount();
    }
}

if (!document.querySelector('#sub-app-b')) {
    mount();
}



